﻿@model IEnumerable<WebDauGia.Domain.Models.DanhMucSanPham>

@{
    ViewBag.Title = "Danh Muc Sản Phẩm";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}


<h2>Danh Mục Sản Phẩm</h2>
<form id="mainform" action="">
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
        <tr>
            <th class="table-header-repeat line-left"><a href="">ID</a></th>
            <th class="table-header-repeat line-left"><a href="">Tên</a></th>
            <th class="table-header-repeat line-left"><a href="">Mô tả</a></th>
            <th class="table-header-repeat line-left"><a href="">Active</a></th>
            <th class="table-header-repeat line-left"><a href="">Actions</a></th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>@item.id</td>
                <td>@Html.ActionLink(item.ten, "EditDanhMucSanPham", new { item.id })</td>
                <td>@item.mota</td>
                <td>@item.active</td>
                <td class="options-width">
                    <a href="" title="Edit" class="icon-1 info-tooltip"></a>
                    @using (Html.BeginForm("DeleteDMSP", "AdminHome"))
                    {
                        
                        @Html.Hidden("id", item.id)                        
                        
                            <input type="submit" value="Delete" />
                        
                        
                    }
                </td>
            </tr>
        }
    </table>
</form>
<p>@Html.ActionLink("Thêm Danh mục mới", "CreateDanhMucSanPham")</p>
